package edu.sctu.wulixia.month4and5.day20150515;

/**
 * Created by user05 on 2015/5/15.
 */
public class TestChildTwo extends TestParent {
    Student_Info[] students;

    public TestChildTwo(Student_Info[] students) {
        super("学生基本信息2：");
        this.students = students;
    }

    @Override
    public int getSysyTem() {
        int number = 0;
        for (int i = 0; i < students.length; i++) {
            if (students[i].getScore() >= 60 && students[i].getSex().equals("男")) {
                number++;
                System.out.println(students[i].getName() + "及格条件，且是男生");
                System.out.println("他的信息：年龄：" + students[i].getAge());
                System.out.print("  分数：" + students[i].getScore());
                System.out.print("  学号：" + students[i].getNumber());
                System.out.println("  家庭住址：" + students[i].getAddress());
            }
        }
        System.out.println("考试及格且是男生的人数为：" + number +"\n\n");
        return number;
    }
}
